import request from '@/utils/request'

// 查询
export function fetchList (data) {
  return request.post('/${moduleName}/${table.camelCaseName}/page', data)
}

// 新建
export function create (data) {
  return request.post('/${moduleName}/${table.camelCaseName}/create', data, {
    trim: true
  })
}

// 修改
export function updateById (data) {
  return request.post('/${moduleName}/${table.camelCaseName}/updateById', data, {
    trim: true
  })
}

// 删除
export function deleteById (id) {
  return request.get(`/${moduleName}/${table.camelCaseName}/delete/<#noparse>${id}</#noparse>`)
}

// 批量删除
export function deleteByIdInBatch (ids) {
  return request.get('/${moduleName}/${table.camelCaseName}/delete/batch', {
    params: {
      ids
    }
  })
}
